<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>校园公告</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
</head>
<body>

	<table class="layui-hide" id="noticelist" lay-filter="notice"></table>

	<c:if test="${user.role.r_id==2||user.role.r_id==3||user.role.r_id==4}">
		<script type="text/html" id="toolbarDemo">
  <div class="layui-btn-container">
    <button class="layui-btn layui-btn-sm" lay-event="add">添加</button>
    <button class="layui-btn layui-btn-sm" lay-event="delete">删除</button>
    <button class="layui-btn layui-btn-sm" lay-event="update">编辑</button>
  </div>
	</script>
	</c:if>
	<!-- 发布公告界面 -->
	<form id="edit_notice" lay-filter="edit_notice"
		class="layui-form layui-form-pane"
		style="margin: 0; pause: 5px 0 0 25px; color: #333;display: none;">
		
		<div class="layui-form-item" style="display: none;">
			<label class="layui-form-label">公告ID：</label>
			<div class="layui-input-block">
				<input type="hidden" id="notice_id" name="notice_id" autocomplete="off" class="layui-input">
			</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">公告标题：</label>
			<div class="layui-input-block">
				<input type="text" name="notice_title" id="notice_title"  class="layui-input">
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">公告内容</label>
		    <div class="layui-input-block">
		      <textarea  class="layui-textarea" name="notice_content" id="notice_content"  style="height: 300px;vertical-align:top;"></textarea>
		    </div>
		  </div>
		  
		<div class="layui-form-item">
			<label class="layui-form-label">发布人：</label>
			<div class="layui-input-block">
				<input type="text" name="people" readonly="readonly" autocomplete="off" class="layui-input">
			</div>
		</div>
		  
		 <div class="layui-form-item">
		    <label class="layui-form-label">重要程度</label>
		    <div class="layui-input-block">
		      <select name="notice_jibie" id="notice_jibie">
		        <option value="0" selected="selected">一般</option>
		        <option value="1">重要</option>
		        <option value="2">重要紧急</option>
		      </select>
		    </div>
		  </div>
		<div class="layui-inline">
			<label class="layui-form-label">发布时间：</label>
			<div class="layui-input-inline">
				<input type="text" class="layui-input" name="createtime" id="createtime" placeholder="yyyy-MM-dd">
			</div>
		</div>

		<div class="layui-inline">
			<label class="layui-form-label">截至时间：</label>
			<div class="layui-input-inline">
				<input type="text" class="layui-input" name="aborttime" id="aborttime" placeholder="yyyy-MM-dd">
			</div>
		</div>
		
		 <div class="layui-form-item">
		    <label class="layui-form-label">发送对象：</label>
		    <div class="layui-input-inline">
		      <select name="quiz1" lay-filter="fsdx" id="fsdx">
		        <option value="">请选择发送对象</option>
		        <option value="全校" selected="">全校</option>
		        <option value="班级">班级</option>
		      </select>
		    </div>
		    <div class="layui-input-inline" style="display: none" id="banji">
		      <select name="clazz_id.clazz_id" id="clazz_id">
		      </select>
		    </div>
		  </div>
		
		 <div class="layui-form-item">
		    <div class="layui-input-block">
		      <button type="button" class="layui-btn layui-btn-primary" id="addbotton">立即提交</button>
		      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
		    </div>
		  </div>
	</form>
	
	
	<!-- 查看公告界面 -->
	<form id="query_notice" lay-filter="query_notice"
		class="layui-form layui-form-pane"
		style="margin: 0; pause: 5px 0 0 25px; color: #333; display: none;">

		<div class="layui-form-item">
			<label class="layui-form-label">公告标题：</label>
			<div class="layui-input-block">
				<input type="text" name="title" readonly="readonly" autocomplete="off" class="layui-input">
			</div>
		</div>
		
		 <div class="layui-form-item layui-form-text">
		    <label class="layui-form-label">公告内容</label>
		    <div class="layui-input-block">
		      <textarea class="layui-textarea" name="contentx" readonly="readonly" style="height: 300px;vertical-align:top;"></textarea>
		    </div>
		  </div>

		<div class="layui-form-item">
			<label class="layui-form-label">发布人：</label>
			<div class="layui-input-block">
				<input type="text" name="people" readonly="readonly" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">重要程度：</label>
			<div class="layui-input-block">
				<input type="text" name="dengji" readonly="readonly" autocomplete="off" class="layui-input">
			</div>
		</div>

		<div class="layui-inline">
			<label class="layui-form-label">发布时间：</label>
			<div class="layui-input-inline">
				<input type="text" class="layui-input" readonly="readonly" name="fabu" id="fabu" placeholder="yyyy-MM-dd">
			</div>
		</div>

		<div class="layui-inline">
			<label class="layui-form-label">截至时间：</label>
			<div class="layui-input-inline">
				<input type="text" class="layui-input" readonly="readonly" name="jiezhi" id="jiezhi" placeholder="yyyy-MM-dd">
			</div>
		</div>
		
		<div class="layui-form-item">
			<label class="layui-form-label">发送对象：</label>
			<div class="layui-input-block">
				<input type="text" name="duixiang" readonly="readonly" autocomplete="off" class="layui-input">
			</div>
		</div>

	</form>

	<!-- js引入 -->
	<script src="js/jquery.js"></script>
	<script src="layui/layui.js" charset="utf-8"></script>
	<script src="js/notice.js" charset="utf-8"></script>
</body>
</html>